import Cookies from 'js-cookie'

const TokenKey = 'car_beauty_token'
const UserKey = 'user'
const CartKey = 'cart'

export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}

export function getUser() {
  return Cookies.get(UserKey)
}

export function setUser(username) {
  return Cookies.set(UserKey, username)
}

export function removeUser() {
  return Cookies.remove(UserKey)
}

export function getCart() {
  return Cookies.get(CartKey)
}

export function setCart(cartList) {
  return Cookies.set(CartKey, cartList)
}

export function removeCart() {
  return Cookies.remove(CartKey)
}
